module.exports = app => {
  const { router, controller, middleware } = app;
  //登录
  router.post('/api/login', controller.login.login)

  //注册
  router.post('/api/register', controller.login.register)

  //往数据库添加数据
  router.get('/api/mock', controller.home.mock)

  //获取楼市资讯数据  
  router.post('/api/getRealList', middleware.auth(), controller.home.getRealList)

  //获取热门楼盘数据
  router.post('/api/hotHome', middleware.auth(), controller.home.getHotList)

  //获取经纪人数据
  router.post('/api/getBroker', middleware.auth(), controller.home.getBroker)

  //获取二手房数据
  router.post('/api/getResoldHome', middleware.auth(), controller.home.getResoldHome)
};
